package com.rundow.driver.modbus.factory;

import com.rundow.common.base.utils.ApplicationContextUtil;
import com.rundow.common.sdk.factory.ServiceContainerFactory;
import com.rundow.common.sdk.service.DriverCommandService;
import com.rundow.common.sdk.service.DriverCustomService;
import com.rundow.common.sdk.service.DriverScheduleService;

public class ModBusFactory implements ServiceContainerFactory {
    @Override
    public DriverCustomService createDriverCustomService() {
        final DriverCustomService modbusDriverCustomService =(DriverCustomService) ApplicationContextUtil.getBean("modbusDriverCustomService");
        return modbusDriverCustomService;
    }

    @Override
    public DriverCommandService createdriverCommandService() {
        final DriverCommandService modbusDriverCommandService =(DriverCommandService) ApplicationContextUtil.getBean("modbusDriverCommandService");
        return modbusDriverCommandService;
    }

    @Override
    public DriverScheduleService createdriverScheduleService() {
        final DriverScheduleService modbusDriverScheduleService =(DriverScheduleService) ApplicationContextUtil.getBean("modbusDriverScheduleService");
        return modbusDriverScheduleService;
    }
}
